//
//  UIScrollView+YTParallax.h
//  YiTuUserClient
//
//  Created by 石少庸 on 2017/3/8.
//  Copyright © 2017年 YiTu. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface YTScrollParallaxCover : UIImageView

@property (nonatomic, weak) UIScrollView *scrollView;

- (instancetype)initWithFrame:(CGRect)frame
            andContentTopView:(UIView *)view
                  andImageUrl:(NSString *)imageUrl
                     withBlur:(BOOL)blur;
@end

@interface UIScrollView (YTParallax)

@property (nonatomic, weak) YTScrollParallaxCover *parallaxCoverView;

- (void)addParallaxCoverWithImage:(UIImage *)image
                         withBlur:(BOOL)blur;
- (void)addParallaxCoverWithImage:(UIImage *)image
                      withTopView:(UIView *)topView
                         withBlur:(BOOL)blur;

- (void)addParallaxCoverWithImageUrl:(NSString *)imageUrl
                            withBlur:(BOOL)blur;
- (void)addParallaxCoverWithImageUrl:(NSString *)imageUrl
                         withTopView:(UIView *)topView
                            withBlur:(BOOL)blur;

- (void)removeParallaxCoverView;

@end
